home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Apr 90 / MacApp.Tech$ 4⁄27⁄90 / 1210-Re TEEdit selection -Apr90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.6 KB  |  44 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    8569638                         26-April-90        11:58PDT
  4.  
  5. From:   D6020                           Info Research, John MacVeigh,PRT
  6.  
  7. To:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    RE TEEdit selection problem
  10.  
  11. Mark,
  12.  
  13. You most likely have the vertical size determiner for your TEView set to
  14. sizeVariable. In this case, the view's height is calculated from the size of
  15. the TE record. The result is that the view's extent is only as "tall" as the
  16. text, and so ContainsMouse returns False.  My solution to this problem used the
  17. fact that my TEView was a subview of a scroller. By intercpeting the click in
  18. the scroller (which only occurs if the text is smaller than the scroller view)
  19. I can pass it on to the TEView:
  20.  
  21. {$S ASelCommand}
  22. Function TMyScroller.DoMouseCommand (Var theMouse: Point;
  23.                Var info: EventInfo; Var hysteresis: Point): TCommand; OVERRIDE;
  24. {overriden so that if the TEView is smaller than the scroller, we
  25.  can intercept clicks in the scroller and make them act like clicks
  26.  at the end of the TEView. This only gets called if TEView is smaller
  27.  than the scoller.}
  28.  
  29. Begin
  30.    DoMouseCommand := TMyDialog(GetDialogView).fMyTEView.
  31.                         DoMouseCommand (theMouse, info, hysteresis)
  32. End;   {TMyScroller.DoMouseCommand}
  33.  
  34. Fortunately the TEView interprets the mouse position to mean "at the end",
  35. without any further work on my part.
  36.  
  37. I don't change the cursor within the scroller, and I'm not sure that it should
  38. be changed, since that would indicate that you can edit _at that point_, which
  39. is not technically correct.
  40.  
  41. Hope this helps,
  42. John MacVeigh
  43.  
  44.